﻿@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Mvc.Common;
@using FwProject.PrePaymentInfo.Dto
@model IPagedList<SettleAccountsKnowingOutputDto>
@{
    Layout = null;
}
<div id="table_print" style="max-height:600px;overflow-y:scroll;">

    <table class="table table-bordered table-hover table-rowselected">
        <thead>
            <tr>
                <th>单据类型</th>
                <th>日期</th>
                <th>单据编号</th>
                <th>对象</th>
                <th>经办人</th>
                <th>结算账户</th>
                <th>收入金额</th>
                <th>支出金额</th>
                @*<th>余额</th>*@
            </tr>
        </thead>
        <tbody>
            @if (Model.Count == 0)
            {
                <tr><td colspan="9" align="center">暂无数据</td></tr>
            }
            else
            {
                @*<tr>
                        <td>期初</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td>0.00</td>
                    </tr>*@
                foreach (var item in Model)
                {

                    <tr>
                        <td>@item.DocumentType</td>
                        <td>@item.CreationTime.ToString("yyyy-MM-dd hh:mm:ss")</td>
                        <td>@item.DocumentNumber</td>
                        <td>@item.RestaurantName</td>
                        <td>@item.AgentPeoper</td>
                        <td>@item.SettlementAccount</td>
                        <td>@item.Income</td>
                        <td>@item.Expenditure</td>
                        @*<td>@item.Over</td>*@
                    </tr>
                }
                @*<tr>
                        <td>期末结存</td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td>0.00</td>
                        <td>0.00</td>
                        <td>0.00</td>
                    </tr>*@
            }
        </tbody>
    </table>
</div>
<div class="row pagedinfo">
    <div class="col-sm-5">
        共 @Model.TotalItemCount 条，
        <select class="form-control" id="pageSize" style="width:70px;display:initial">
            @for (int z = 10; z < 100; z = z + 10)
            {
                if (z == Model.PageSize)
                {
                    <option selected value="@z">@z</option>
                }
                else
                {
                    <option value="@z">@z</option>
                }
            }
        </select> &nbsp; 条/页 当前第 @Model.PageNumber/@Model.PageCount 页
    </div>
    <div class="col-sm-7">
        <input type="hidden" id="pageurl" value="&beginTime=@(Context.Request.Query["beginTime"])&endTime=@(Context.Request.Query["endTime"])" />
        @Html.PagedListPager(Model, page => Url.Action("SettleAccountsKnowingDetail", new { id = page, size = Context.Request.Query["size"], beginTime = Context.Request.Query["beginTime"], endTime = Context.Request.Query["endTime"] }), PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(new AjaxOptions() { AllowCache = false, HttpMethod = "Get", UpdateTargetId = "data_list", OnSuccess = "AjaxSuccessCallback", OnBegin = "AjaxBegin" }))
    </div>
</div>


